class UserReceiptListEntity {
  UserReceiptListData data;
  int code;
  String msg;

  UserReceiptListEntity({this.data, this.code, this.msg});

  UserReceiptListEntity.fromJson(Map<String, dynamic> json) {
    data = json['data'] != null
        ? new UserReceiptListData.fromJson(json['data'])
        : null;
    code = json['code'];
    msg = json['msg'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data']['list'] = this.data.toJson();
    }
    data['code'] = this.code;
    data['msg'] = this.msg;
    return data;
  }
}

class UserReceiptListData {
  List<UserReceiptListDataData> datas;

  UserReceiptListData();

  UserReceiptListData.fromJson(Map<String, dynamic> json) {
    if (json['list'] != null) {
      datas = new List<UserReceiptListDataData>();
      (json['list'] as List).forEach((v) {
        datas.add(new UserReceiptListDataData.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.datas != null) {
      data['list'] = this.datas.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class UserReceiptListDataData {

  String id;
  String invoice_id;
  String user_id;
  String type;
  String purchaser;
  String taxpayer_id;
  String bank;
  String account;
  String contact;
  String address;
  String linkman;
  String is_default;
  String goods_bank;
  UserReceiptListDataData({
    this.id,
    this.contact,
    this.address,
    this.linkman,
    this.is_default,
    this.goods_bank,
    this.invoice_id,
    this.user_id,
    this.type,
    this.purchaser,
    this.taxpayer_id,
    this.bank,
    this.account,
  });

  UserReceiptListDataData.fromJson(Map<String, dynamic> json) {
    address = json['address'].toString();
    linkman = json['linkman'].toString();
    is_default = json['is_default'].toString();
    goods_bank = json['goods_bank'].toString();
    invoice_id = json['invoice_id'].toString();
    user_id = json['user_id'].toString();
    type = json['type'].toString();
    purchaser = json['purchaser'].toString();
    taxpayer_id = json['taxpayer_id'];
    bank = json['bank'];
    account = json['account'].toString();
    contact = json['contact'].toString();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['invoice_id'] = this.invoice_id;
    data['user_id'] = this.user_id;
    data['type'] = this.type;
    data['purchaser'] = this.purchaser;
    data['taxpayer_id'] = this.taxpayer_id;
    data['account'] = this.account;
    data['bank'] = this.bank;
    data['contact'] = this.contact;

    return data;
  }
}
